Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add --no-file-parallelism, --maxWorkers, --minWorkers flags #4705

Merged
merged 6 commits into from
Dec 19, 2023

Conversation

sheremet-va
Copy link
Member

@sheremet-va sheremet-va commented Dec 8, 2023

Description

This PR adds --maxWorkers, --minWorkers flags, and --no-file-parallelism flag that sets both of them to 1.

This flag is particularly useful for debugging. See: #4643

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Copy link

netlify bot commented Dec 8, 2023

Deploy Preview for fastidious-cascaron-4ded94 ready!

Name Link
🔨 Latest commit 63b7aac
🔍 Latest deploy log https://app.netlify.com/sites/fastidious-cascaron-4ded94/deploys/65805f6b3eaa7e00088e0a16
😎 Deploy Preview https://deploy-preview-4705--fastidious-cascaron-4ded94.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sheremet-va sheremet-va changed the title feat: add --no-paralelism, --maxWorkers, --minWorkers flags feat: add --no-parallelism, --maxWorkers, --minWorkers flags Dec 8, 2023
Copy link
Member

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be mentioned on

```sh
# To run in a single worker
vitest --inspect-brk --pool threads --poolOptions.threads.singleThread
# To run in a single child process
vitest --inspect-brk --pool forks --poolOptions.forks.singleFork
```

packages/vitest/src/types/config.ts Outdated Show resolved Hide resolved
packages/vitest/src/node/pools/child.ts Show resolved Hide resolved
docs/config/index.md Outdated Show resolved Hide resolved
packages/vitest/src/types/config.ts Outdated Show resolved Hide resolved
packages/vitest/src/types/config.ts Outdated Show resolved Hide resolved
@sheremet-va sheremet-va added this to the 1.1.0 milestone Dec 9, 2023
docs/config/index.md Outdated Show resolved Hide resolved
@sheremet-va
Copy link
Member Author

@AriPerkkio what do you think about renaming it to --no-file-parallelism?

@AriPerkkio
Copy link
Member

AriPerkkio commented Dec 18, 2023

Right, as this does not change describe.concurrent and test.concurrent? For debugging purposes it probably should.

@sheremet-va sheremet-va changed the title feat: add --no-parallelism, --maxWorkers, --minWorkers flags feat: add --no-file-parallelism, --maxWorkers, --minWorkers flags Dec 18, 2023
@sheremet-va sheremet-va merged commit fd5d7e6 into vitest-dev:main Dec 19, 2023
18 checks passed
@sheremet-va sheremet-va deleted the feat/add-parallelism-flag branch December 19, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants